]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
closeDialog: Make dialog inactive while fading out
authorJonas Ådahl <jadahl@gmail.com>
Wed, 19 Feb 2020 21:54:42 +0000 (22:54 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 21 Feb 2020 08:11:57 +0000 (08:11 +0000)
Otherwise the user might click Kill, which would crash if the fade-out
was triggered because a Wayland window was closed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1032

js/ui/closeDialog.js
js/ui/dialog.js

index 4ee6de6d2872334f98a1a5d0ead367ece3848c6e..01799bd4ce5a21a95cf46da22c36807c6dfc0e03 100644 (file)
@@ -192,6 +192,7 @@ var CloseDialog = GObject.registerClass({
         this._dialog = null;
         this._removeWindowEffect();
 
+        dialog.makeInactive();
         dialog._dialog.ease({
             scale_y: 0,
             mode: Clutter.AnimationMode.LINEAR,
index 694da4e1517516ee2f026a9f5244ee4236ef0491..dacdf3d39967296ba3b16e9d54c5b4a5309da7f0 100644 (file)
@@ -58,10 +58,16 @@ class Dialog extends St.Widget {
         this._dialog.add_child(this.buttonLayout);
     }
 
-    _onDestroy() {
+    makeInactive() {
         if (this._eventId != 0)
             this._parentActor.disconnect(this._eventId);
         this._eventId = 0;
+
+        this.buttonLayout.get_children().forEach(c => c.set_reactive(false));
+    }
+
+    _onDestroy() {
+        this.makeInactive();
     }
 
     _modalEventHandler(actor, event) {